Skip to main content

launch

Type

command

Summary

Starts up an application, optionally opening a document in the application.

Syntax

launch [<documentPath> with] <applicationPath>

Description

Use the launch command to start an application for the user to use.

When the launch command executes, the application being launched comes to the foreground. When the user quits, LiveCode comes to the foreground.

If no documentPath is specified, the following two statements are equivalent:

    launch application
open process application for neither
note

On OS X systems, you can use the launch command to start up an application, but not a Unix process. To work with a Unix process, use the shell function instead.

tip

On Windows systems, you can also start up an application by using the shell function with the Windows "start" command:

    get shell(\"start MyProgram.exe\")

Parameters

NameTypeDescription

documentPath

The location and name of a file to open with the specified application. If no path is specified, the launch command assumes that the file is in the defaultFolder.

applicationPath

The location and name of the application to start up. If no path is specified, the launch command assumes that the application is in the defaultFolder.

Examples

launch "SimpleText"
launch "/Documents/Projects/test.txt" with myApp
launch it with (field "Application")

command: launch url, kill, launch document

function: shell

glossary: command

property: hideConsoleWindows, secureMode

Compatibility and Support

Introduced

LiveCode 1.0

OS

mac

windows

linux

Platforms

desktop

server

Thank you for your feedback!

Was this page helpful?